package com.huawei.appmarket.service.settings.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import o.cgz;
import o.cht;
import o.cih;

public abstract class BaseAboutNode extends cht {
    protected LayoutInflater ˊ;

    public abstract int ˋ();

    public abstract cgz ˎ();

    public BaseAboutNode(Context context) {
        super(context, 1);
        this.ˊ = LayoutInflater.from(context);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
        layoutParams.weight = 1.0f;
        View ˏ = ˏ(this.ˊ, ˋ());
        if (ˏ != null) {
            cih ˎ = ˎ();
            ˎ.ˏ(ˏ);
            ˊ(ˎ);
            viewGroup.addView(ˏ, layoutParams);
        }
        return true;
    }

    protected View ˏ(LayoutInflater layoutInflater, int i) {
        if (layoutInflater == null) {
            return null;
        }
        return (LinearLayout) layoutInflater.inflate(i, null);
    }
}
